import {createRouter,createWebHistory} from 'vue-router'

import login from '../view/login.vue'
import LoginForm from '../component/LoginForm.vue'
import RegisterForm from '../component/RegisterForm.vue'
import options from '@/view/options.vue'
import Welcome from '@/component/Welcome.vue'
import PersonalInfo from '@/component/PersonalInfo.vue'
import ErrInfo from '@/component/ErrInfo.vue'
import ChangePassword from '@/component/ChangePassword.vue'


const routes = [
    {
      path:'/',
      component:login,
      children:[
        {
          path:'',
          component:LoginForm
        },
        {
          path:'regist',
          component:RegisterForm
        }
      ]
    },
    {
      path:'/Student',
      component:options,
      children:[
        {
          path:'',
          component:Welcome
        },
        {
          path:'ShowInfo',
          component:PersonalInfo
        },
        {
          path:'ErrInfo',
          component:ErrInfo
        },
        {
          path:'ChangePassword',
          component:ChangePassword
        }
      ]
    }
  ];
  
  const router = createRouter({
    history: createWebHistory(),
    routes
  });
  
  export default router;